for g in range(0,21):
    for m in range(0,34):
        for c in range(0,101):
            if g+m+c==100 and g*5+m*3+c/3==100:
                print("公鸡有",g,"只，母鸡有",m,"只，雏鸡有",c,"只")